package com.itheima_10;

import java.util.ArrayList;
import java.util.Iterator;

public class test_10 {
    public static void main(String[] args) {
        ArrayList<String> list =new ArrayList();
        list.add("a");
        list.add("a");
        list.add("b");
        list.add("b");
        list.add("c");
        list.add("v");
        list.add("b");
        //Iterator<String> iterator = list.iterator();
       /* while (iterator.hasNext()){
            String next = iterator.next();
            if(next.equals("a")){
            iterator.remove();
            System.out.println(next);
            }
        }*/
       for(String s:list){
           System.out.println(s);
        }
    }
}
